home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / comm / bbs / usered10.lha / User-Editor / INSTALL < prev    next >
Text File  |  1997-08-23  |  9KB  |  289 lines

  1. ; $VER: User-Editor Install V1.0 (23.8.97) - written by Sascha "SieGeL" Pfalz
  2. ; Installer and Installer project icon
  3. ; (c) Copyright 1985-97 Amiga International Inc.  All Rights Reserved.
  4. ;
  5. ; For best view set TAB to 2
  6. ;
  7. ; This script follows the rules for the Installer, all text vars have a 
  8. ; t_ preceeding the var name, all other vars have the # in front of the
  9. ; names and all sub procedures (if any) will start with P_ .
  10. ;
  11. ; V1.0 (3.8.97)   - Initial Version, Script is able to update or full install
  12. ;                   the User-Editor including Guides and Locale files.
  13. ; V1.1 (10.8.97)  - Changed the script so that it automatically recognizes
  14. ;                   if some of the files to copy are missing (Update etc.)
  15. ;                   In this case only the existing files will be copied.
  16. ;                   This also includes the documentation parts, so this script
  17. ;                   won't abort any longer if not all of the files are present.
  18. ; V1.2 (23.8.97)  - First public Release of the User-Editor package.
  19.  
  20. ;===================
  21. ;= Check-Variables =
  22. ;===================
  23.  
  24. (set @user-level 2)
  25.  
  26. (set #MUI "MUI")
  27. (set #MUIMASTER_VMIN 11)
  28. (set #MUIMASTER_PATH "MUI:Libs/muimaster.library")
  29. (set #USERED     "modules/User-Editor")
  30. (set #USEDGUIDE "modules/User-Editor.guide")
  31. (set #USEDHIST     "modules/User-Editor.history")
  32. (set #USEDCATDE    "catalogs/deutsch/UserEd.catalog")
  33.  
  34. ;================
  35. ;= GERMAN TEXTS =
  36. ;================
  37.  
  38. (IF (= @language "deutsch")
  39.     (
  40.     (set default_lang 2)
  41.  
  42.     (set t_StartMsg            (cat        "\nInstallations-Skript des User-Editors für FAME\n\n"
  43.                                                             "Dieses Skript installiert den User-Editor und alle relevanten\n"
  44.                                                             "Dateien auf Ihrem System.\n\n"
  45.                                                             "FAME ist © 1993-97 by David 'Strider' Wettig\n"
  46.                                                             "User-Editor ist © 1995-97 by Sascha 'SieGeL' Pfalz\n"
  47.                                                             "MUI ist © 1993-97 by Stefan Stuntz"))
  48.     (set t_bad-kick            (cat        "\nSie benötigen mindestens AmigaOS V2.04 oder\n\n"
  49.                                                             "höher, um den User-Editor zu benutzen !\n\n"
  50.                                                             "-> Bitte updaten Sie Ihr System <-"))
  51.     (set t_wrong_mui        (cat        "Falsche MuiMaster.library Version!\n\n"
  52.                                                             "Installiert ist V%ld.%ld, benötigt wird aber mind. V11 !\n\n"
  53.                                                             "Bitte updaten Sie Ihr MUI System auf V3.6+\n(Library-Version 11+) !"))
  54.     (set t_no_mui                (cat        "Konnte MUI nicht finden !\n"
  55.                                                             "User-Editor benötigt unbedingt MUI V3.6+ um zu arbeiten !\n\n"
  56.                                                             "Bitte erst das MUI System installieren (es lohnt sich) und\n"
  57.                                                             "dann diese Installation nochmal beginnen !"))
  58.     (set t_AskForDest                        "Bitte Ziel-Pfad für den User-Editor angeben:")
  59.     (set t_copyused                            "Kopiere User-Editor und das Piktogramm...")
  60.     (set t_selectlocale    (cat        "Bitte Sprache(n) zum Installieren/Updaten auswählen:\n"
  61.                                                             "(Alle Kataloge werden nach PROGDIR:Catalogs/ kopiert)"))
  62.     (set t_askfordocs                        "Dokumentation installieren/updaten (derzeit nur englisch) ?")
  63.     (set t_selectdocs                        "Bitte auswählen, welche Teile der Dokumentation installiert/geupdated werden sollen:")
  64.     (set t_askforddest                    "Bitte Zielverzeichnis für die Dokumentation auswählen:")
  65.     ))
  66.  
  67. ;=================
  68. ;= ENGLISH TEXTS =
  69. ;=================
  70.  
  71. (IF (= @language "english")
  72.     (
  73.     (set default_lang 4)
  74.  
  75.     (set t_StartMsg     (cat            "\nInstallation Script of User-Editor for FAME\n\n"
  76.                                                             "This script will install User-Editor and all required\n"
  77.                                                             "files to your System.\n\n"
  78.                                                             "FAME is © 1993-97 by David 'Strider' Wettig.\n"
  79.                                                             "User-Editor is © 1995-97 by Sascha 'SieGeL' Pfalz\n"
  80.                                                             "MUI is © 1993-97 by Stefan Stuntz"))
  81.     (set t_bad-kick            (cat        "\n\nYou must be using AmigaOS V2.04 or higher\n\n"
  82.                                                             "to use the User-Editor !\n\n"
  83.                                                             "-> Please update your machine ! <-"))
  84.     (set t_wrong_mui        (cat        "Wrong MuiMaster.library Version !\n\n"
  85.                                                             "Installed is V%ld.%ld, required is at least V11 !\n\n"
  86.                                                             "Please update your MUI System to at least V3.6+\nLibrary-Version 11+) !"))
  87.     (set t_no_mui                (cat        "Unable to find MUI System !\n"
  88.                                                             "User-Editor requires MUI V3.6+ to work !\n"
  89.                                                             "Please install first the MUI System and restart this Installation\n"
  90.                                                             "after the MUI system is installed."))
  91.     (set t_AskForDest                        "Specify destination for User-Editor:")
  92.     (set t_copyused                            "Now copying User-Editor and the Icon...")
  93.     (set t_selectlocale    (cat        "Please choose language(s) to install/update:\n"
  94.                                                             "(English is built-in, all other catalogs will be copied to PROGDIR:Catalogs/"))
  95.     (set t_askfordocs                        "Do you wish to install/update the documentation ?")
  96.     (set t_selectdocs                        "Please choose which parts of the documentation should be installed/updated:")
  97.     (set t_askforddest                    "Select Destination directory for the documentation:")
  98.     ))
  99.  
  100. ;****************************************************************************
  101. ;***                  MAIN INSTALLATION SCRIPT STARTS HERE !              ***
  102. ;****************************************************************************
  103.  
  104. (set #osver (/ (getversion) 65536))                ; Determine OS Version...
  105. (if (< #osver 37) ( (ABORT t_bad-kick)))    ; ...and stop if OS < 37
  106. (complete 0)
  107. (message t_StartMsg)
  108. (complete 1)
  109. (welcome)
  110.  
  111. ;======================================================================
  112. ;= FIRST SYSTEM-CHECKS TO DETERMINE USED AMIGA AND INSTALLED SOFTWARE =
  113. ;======================================================================
  114.  
  115. (set #MUI_ASSIGN (getassign #MUI))                ; Check if MUI exists!
  116.  
  117. (if (<> #MUI_ASSIGN "")
  118.     (
  119.     (set #muiver (/ (getversion #MUIMASTER_PATH) 65536))     ; Get Version
  120.     (set #muirev (* (getversion #MUIMASTER_PATH) 65536))    ; ???
  121.     (set #muirev (/ #muirev 65536))                                                ; Get Revision
  122.     (if (< #muiver #MUIMASTER_VMIN) (ABORT (t_wrong_mui #muiver #muirev)))
  123.     (complete 6)
  124.     )
  125.     (
  126.     (abort t_no_mui)
  127.     ))
  128.  
  129.  
  130. ;======================================================================
  131. ;=       PROMPT FOR THE DESTINATION DIRECTORY & COPY MAIN FILES       =
  132. ;======================================================================
  133.  
  134. (if (<> 0 (exists #USERED))
  135.     (
  136.  
  137.     (set #mypath "")
  138.  
  139.     (until (<> #mypath "")
  140.         (
  141.         (set #mypath
  142.             (askdir (prompt t_AskForDest)
  143.                             (default "FAME:Modules")
  144.                             (help @askdir-help)))
  145.         ))
  146.     (complete 12)
  147.  
  148.     (set @default-dest #mypath)
  149.  
  150.  
  151.     (copylib     (prompt t_copyused)
  152.                         (source "Modules/User-Editor")
  153.                         (dest        @default-dest)
  154.                         (confirm)
  155.                         (help    @copylib-help)
  156.                         (infos))
  157.     )
  158.     (
  159.     (set @default-dest "FAME:Modules")
  160.     )
  161. )
  162. (complete 20)
  163.  
  164. ;======================================================================
  165. ;=                      INSTALL LOCALE CATALOGS                       =
  166. ;======================================================================
  167.  
  168. (if (<> 0 (exists #USEDCATDE))
  169.     (
  170.  
  171.     (if (= default_lang 2)     (set #def -1)
  172.                                                     (set #def 0))
  173.  
  174.  
  175.     (set #catalogs
  176.         (askoptions    (prompt t_selectlocale)
  177.                                 (help @askoptions-help)
  178.                                 (choices    "pdeutsch"
  179.                                                     "")
  180.                                 (default #def)))
  181.     (complete 30)
  182.  
  183.     (if (IN #catalogs 0) 
  184.         (
  185.         (set #mkpath (tackon @default-dest "Catalogs/deutsch"))
  186.         (makedir #mkpath)
  187.         (copyfiles     (prompt "Kopiere deutschen Katalog...")
  188.                                 (source "Catalogs/deutsch/UserEd.catalog")
  189.                                 (dest     #mkpath)
  190.                                 (help @copyfiles-help))
  191.  
  192.         (complete 40)
  193.  
  194.         ))
  195.     ))
  196.  
  197. ;======================================================================
  198. ;=        INSTALL AMIGA-GUIDE DOCUMENTATION & HISTORY FILE            =
  199. ;======================================================================
  200.  
  201. (complete 55)
  202.  
  203. (set #myguide (exists #USEDGUIDE))
  204. (set #myhist (exists #USEDHIST))
  205.  
  206. (set #docdef 0)
  207.  
  208. (if (OR (<> 0 #myguide) (<> 0 #myhist))
  209.     (
  210.     (if (= 1 (AskBool    (prompt t_askfordocs)    (help        @askbool-help)))
  211.         (
  212.  
  213.         (if (<> 0 #myguide) 
  214.             (
  215.             (set #selguide "AmigaGuide Manual   (61kb)")
  216.             (set #docdef (+ #docdef 1))
  217.             )
  218.             (
  219.             (set #selguide "")
  220.             )
  221.         )
  222.  
  223.         (if (<> 0 #myhist)     
  224.             (
  225.             (set #selhis "User-Editor.History (16kb)")
  226.             (set #docdef (+ #docdef 2))
  227.             )
  228.             (
  229.             (set #selhis "")
  230.             )
  231.         )
  232.  
  233.         (complete 60)
  234.  
  235.  
  236.         (set #docparts
  237.             (askoptions (prompt        t_selectdocs)
  238.                                     (help            @askoptions-help)
  239.                                     (choices #selguide
  240.                                                    #selhis)
  241.                                     (default #docdef)))
  242.         (complete 70)
  243.  
  244.         (if (<> 0 #docparts)
  245.             (
  246.             (set #docdest
  247.                 (askdir (prompt     t_askforddest)
  248.                                 (help            @askdir-help)
  249.                                 (default    "FAME:Documentation")))
  250.  
  251.             (complete 75)
  252.  
  253.             (if (<> "" #docdest)
  254.                 (
  255.                 (if (IN #docparts 0)
  256.                     (
  257.                     (copyfiles     (prompt "Install AmigaGuide...")
  258.                                             (help        @copyfiles-help)
  259.                                             (source    "Modules/User-Editor.guide")
  260.                                             (dest        #docdest)
  261.                                             (infos))
  262.  
  263.                     (complete 85)
  264.  
  265.                     ))
  266.                 (if (IN #docparts 1)
  267.                     (
  268.                     (copyfiles     (prompt "Install History...")
  269.                                             (help        @copyfiles-help)
  270.                                             (source    "Modules/User-Editor.history")
  271.                                             (dest        #docdest)
  272.                                             (infos))
  273.  
  274.                     (complete 95)
  275.  
  276.                     ))
  277.                 ))
  278.             ))
  279.         ))
  280.     ))
  281.  
  282.  
  283. ;======================================================================
  284. ;=                       END OF INSTALLATION                          =
  285. ;======================================================================
  286.  
  287. (complete 100)
  288. (exit)
  289.